package com.sls.web.manager.recharge.service;

import java.util.List;

import com.sls.web.manager.page.Pagination;
import com.sls.web.manager.pojo.UserInfoVO;
import com.sls.web.manager.recharge.pojo.CardInfo;
import com.sls.web.manager.recharge.querybean.CardInfoQuery;

/**
 * @author sxf
 * 
 */
public interface CardInfoService {
	public boolean saveCardInfo(CardInfo cardInfo, UserInfoVO userInfoVO)
			throws Exception;

	public boolean insertCardInfoBatch(List<CardInfo> list,
			UserInfoVO userInfoVO) throws Exception;

	// public CardInfo queryCardInfoById(String id, UserInfoVO userInfoVO);

	/**
	 * 查询卡密信息
	 * 
	 * 参数:<br>
	 * cardSerial,卡密序列号;<br>
	 * cardPassword,卡密密码;<br>
	 * cardId:卡密编号;<br>
	 * cardName,卡密名称;<br>
	 * startSaleDate,开始销售日期;<br>
	 * endSaleDate ,结束销售日期;<br>
	 * importStartDate ,导入开始日期<br>
	 * importEndDate,导入结束日期;<br>
	 * status,<br>
	 * enable,<br>
	 * cardImportBatchNum,导入批次号;<br>
	 * useLevel, <br>
	 * adaptableArea,可充值区域<br>
	 * phoneType,号码类型<br>
	 * operatingAgenciesType,<br>
	 * cardPrice 卡密面值
	 * 
	 * @param query
	 * @param userInfoVO
	 * @return
	 * @throws Exception
	 */
	public List<CardInfo> queryCardInfo(CardInfoQuery query,
			UserInfoVO userInfoVO) throws Exception;

	/**
	 * 生成文件(.txt)
	 * 
	 * @param query
	 * @param userInfoVO
	 * @return
	 * @throws Exception
	 */
	public String createCardInfoFileTxt(CardInfoQuery query,
			UserInfoVO userInfoVO) throws Exception;

	/**
	 * 查询卡密信息
	 * 
	 * 参数:<br>
	 * cardSerial,卡密序列号;<br>
	 * cardPassword,卡密密码;<br>
	 * cardId:卡密编号;<br>
	 * cardName,卡密名称;<br>
	 * startSaleDate,开始销售日期;<br>
	 * endSaleDate ,结束销售日期;<br>
	 * importStartDate ,导入开始日期<br>
	 * importEndDate,导入结束日期;<br>
	 * status,<br>
	 * enable,<br>
	 * cardImportBatchNum,导入批次号;<br>
	 * useLevel, <br>
	 * adaptableArea,可充值区域<br>
	 * phoneType,号码类型<br>
	 * operatingAgenciesType,<br>
	 * cardPrice 卡密面值
	 * 
	 * @param query
	 * @param userInfoVO
	 * @return
	 * @throws Exception
	 */
	public Pagination<CardInfo> queryCardInfoPage(CardInfoQuery query,
			UserInfoVO userInfoVO) throws Exception;

	public boolean deleteCardInfo(UserInfoVO userInfoVO) throws Exception;

	public boolean updateCardInfo(CardInfo cardInfo, UserInfoVO userInfoVO)
			throws Exception;

	public boolean updateCardInfoByImportBatchNum(CardInfo cardInfo,
			UserInfoVO userInfoVO) throws Exception;
}
